
<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>：jQuery省市区三级联动插件city-picker</title>
  <link rel="stylesheet" href="layui/css/layui.css" media="all">
  <link href="../dist/style/city-picker.css" rel="stylesheet" type="text/css" />
</head>
<body>

<div class="container">
  <h2 class="page-header">演示</h2>
  <div class="docs-methods">
    <form class="form-inline">
      <div id="distpicker">
        <div class="form-group">
          <div style="position: relative;">
            <input id="city-picker3" class="form-control" readonly type="text" value="江苏省/常州市/溧阳市" data-toggle="city-picker">
          </div>
        </div>
        <div class="form-group">
          <button class="btn btn-warning" id="reset" type="button">重置</button>
          <button class="btn btn-danger" id="destroy" type="button">确定</button>
        </div>
      </div>
    </form>
  </div>
</div>
<script src="http://www.zhida2014.com/bigData/js/city/jquery.js"></script>
<script src="http://www.zhida2014.com/bigData/js/city/city-picker.data.js"></script>
<script src="http://www.zhida2014.com/bigData/js/city/city-picker.js"></script>
<script>
  layui.use(['admin', 'form', 'upload'], function(){
    var $ = layui.$
            ,form = layui.form
            ,upload = layui.upload;

//    'use strict';
    var $citypicker1 = $('#city-picker1');
    $citypicker1.citypicker();
    var $citypicker2 = $('#city-picker2');
    $citypicker2.citypicker({province: '江苏省', city: '常州市', district: '溧阳市'});
    var $citypicker3 = $('#city-picker3');
    $('#reset').click(function () {
      $citypicker3.citypicker('reset');
    });
    $('#destroy').click(function () {
      $citypicker3.citypicker('destroy');
    });
  })

</script>
</body>
</html>
